package com.ybwh.springboot2.seq.mapper;


import com.gitee.fastmybatis.core.mapper.CrudMapper;
import com.ybwh.springboot2.seq.model.entity.SeqNo;
import org.apache.ibatis.annotations.Param;

/**
 * 业务序列号信息DAO
 *
 * @author youbeiwuhuan
 * @date 2023-06-07 11:50:26
 */
public interface SeqNoMapper extends CrudMapper<SeqNo/*实体类*/, Long/*主键类型*/> {


    /**
     * 根据seqCode查询
     *
     * @param seqCode
     * @return
     */
    SeqNo selectBySeqCode(@Param("seqCode") String seqCode);

    /**
     * 更新序列号
     *
     * @param seqCode
     * @param newSeq
     * @param oldSeq
     * @param opTime
     * @return
     */
    int updateSeq(@Param("seqCode") String seqCode, @Param("newSeq") Long newSeq, @Param("oldSeq") Long oldSeq, @Param("opTime") Long opTime);
}